package com.kaiwukj.android.ufamily.mvp.ui.page.keeper;

import com.kaiwukj.android.mcas.mvp.IModel;
import com.kaiwukj.android.mcas.mvp.IView;
import com.kaiwukj.android.ufamily.mvp.http.entity.base.ListResp;
import com.kaiwukj.android.ufamily.mvp.http.entity.result.KeeperOrderResult;
import com.kaiwukj.android.ufamily.mvp.http.entity.result.KeeperResult;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;

public interface KeeperContract {
    interface View extends IView {

        //void onFetchList(List<KeeperListResult> results);
        void showKeeperInfo(KeeperResult result);

        void showKeeperList(List<KeeperResult> results);

        void showKeeperOderList(List<KeeperOrderResult> results);
    }

    interface Model extends IModel {
        Observable<List<KeeperResult>> fetchCommunityKeeperList();

        Observable<List<KeeperResult>> fetchSysKeeperList();


        /**
         * 绑定管家
         *
         * @param params bindInfo(管家手机号或者服务码) || housekeeperId
         * @return
         */
        Observable<Integer> bindKeeper(Map<String, Object> params);

        Observable<KeeperResult> getMyKeeperInfo();

        Observable<ListResp<KeeperOrderResult>> fetchKeeperOrder(int page, int pageSize);

        /**
         * 添加管家订单
         *
         * @param keeperId        管家账号ID
         * @param keeperServiceId 管家服务ID
         * @param appointTime     预约时间
         * @param remark          备注
         * @return
         */
        Observable<Integer> addKeeperOrder(Integer keeperId, Integer keeperServiceId, String appointTime, String remark);

        /**
         * 投诉
         *
         * @param content  content
         * @param keeperId keeperId
         * @return
         */
        Observable<Integer> addComplain(String content, Integer keeperId);
    }
}
